<nz-spin [nzSpinning]="loading" [nzDelay]="500">
  <form nz-form [formGroup]="validateForm" (ngSubmit)="submitForm()">
    <nz-form-item>
      <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="roleName">角色名</nz-form-label>
      <nz-form-control [nzSm]="14" [nzXs]="24" nzErrorTip="角色名不能为空且长度小于20">
        <input nz-input formControlName="roleName" id="roleName"/>
      </nz-form-control>
    </nz-form-item>

    <nz-form-item>
      <nz-form-label [nzSm]="6" [nzXs]="24" nzFor="roleName">备注</nz-form-label>
      <nz-form-control [nzSm]="14" [nzXs]="24" [nzErrorTip]="'备注不能大于'+remarkMaxLength+'字符'">
        <nz-textarea-count [nzMaxCharacterCount]="remarkMaxLength">
          <textarea rows="4" formControlName="remark" nz-input></textarea>
        </nz-textarea-count>
      </nz-form-control>
    </nz-form-item>

    <nz-form-item nz-row class="register-area">
      <nz-form-control [nzSpan]="14" [nzOffset]="6">
        <button nz-button nzType="primary" [disabled]="!validateForm.valid || loading">保存</button>
      </nz-form-control>
    </nz-form-item>
  </form>
</nz-spin>
